// Copyright (c) 2009 Luca Marrocco.
// Modified or written by Luca Marrocco for inclusion with codej.
// Licensed under the Apache License, Version 2.0 (the "License")
package codej.ast;

/** @author Luca Marrocco */
public class Annotation extends Modifier {

	public Annotation(String name) {
		super(name);
	}

	public void accept(Visitor visitor) {
		visitor.visit(this);
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null)
			return false;
		if (!(obj instanceof Annotation))
			return false;
		Annotation anotherAnnotation = (Annotation) obj;
		return getName().equals(anotherAnnotation);
	}

	@Override
	public String toString() {
		return "@" + getName();
	}
}
